import 'package:flutter/material.dart';

/// 应用主题配置类
/// 统一管理应用的浅色和深色主题
class AppTheme {
  /// 浅色主题配置
  static ThemeData get lightTheme {
    return ThemeData(
      // 使用Material 3设计风格
      useMaterial3: true,
      
      // 颜色方案配置
      colorScheme: ColorScheme.fromSeed(
        seedColor: Colors.blue,
        brightness: Brightness.light,
      ),
      
      // 应用栏主题配置
      appBarTheme: const AppBarTheme(
        elevation: 0, // 阴影高度
        centerTitle: true, // 标题居中
        scrolledUnderElevation: 0, // 滚动时的阴影高度
      ),
      
      // 卡片主题配置
      cardTheme: CardTheme(
        elevation: 0, // 卡片阴影
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(16), // 圆角边框
        ),
      ),
    );
  }

  /// 深色主题配置
  static ThemeData get darkTheme {
    return ThemeData(
      // 使用Material 3设计风格
      useMaterial3: true,
      
      // 颜色方案配置
      colorScheme: ColorScheme.fromSeed(
        seedColor: Colors.blue,
        brightness: Brightness.dark,
      ),
      
      // 应用栏主题配置
      appBarTheme: const AppBarTheme(
        elevation: 0,
        centerTitle: true,
        scrolledUnderElevation: 0,
      ),
      
      // 卡片主题配置
      cardTheme: CardTheme(
        elevation: 0,
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(16),
        ),
      ),
    );
  }
}